package com.ljb.utilslibrary.ossutils.listener;

import com.alibaba.sdk.android.oss.ClientException;
import com.alibaba.sdk.android.oss.ServiceException;
import com.alibaba.sdk.android.oss.model.GetObjectRequest;

import java.io.InputStream;

/**
 * OSS下载文件的回调接口
 * Created by lijianbin on 2016/11/22.
 */
public interface DownLoadCBListener {

    /**
     * 下载成功的回调
     *
     * @param inputStream
     */
    void onSuccess(InputStream inputStream);

    /**
     * 下载失败的回调
     *
     * @param request
     * @param clientExcepion
     * @param serviceException
     */
    void onFailure(GetObjectRequest request, ClientException clientExcepion, ServiceException serviceException);
}
